package com.bw.controller;

import com.bw.bean.Week;
import com.bw.bean.Week2;
import com.bw.service.WeekService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class WeekController {
    @Autowired
    WeekService weekService;

    @RequestMapping("/list1")
    public List getList1(){
        List<Week> list1 = weekService.getList1();
        return list1;
    }

    @RequestMapping("/list2")
    public List getList2(){
        List<Week> list2 = weekService.getList2();
        return list2;
    }

    @RequestMapping("/list3")
    public List getList3(){
        List<Week2> list3 = weekService.getList3();
        return list3;
    }

    @RequestMapping("/list4")
    public List getList4(){
        List<Week> list4 = weekService.getList4();
        return list4;
    }

    @RequestMapping("/list5")
    public List getList5(){
        List<Week> list5 = weekService.getList5();
        return list5;
    }

    @RequestMapping("/del")
    public int del(){
        int del = weekService.del(16108);
        return del;
    }
}
